﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Areas/SystemAdmin/Master.Master" CodeBehind="ControlListWebsite.aspx.cs" Inherits="OnlineBusinesses.Areas.SystemAdmin.ControlListWebsite" %>
<asp:Content ContentPlaceHolderID="ContentSystemAdmin" runat="server" ID="ContentAdmin">
    <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:10px;">
        <script type="text/javascript">
            $(document).ready(function () {
                // prepare the data
                var data = new Array();
                var danhsach =
                [
                    "Quy định về Luật Kinh Doanh", "Quy định về Luật Thương Mại", "Quy định về Luật Bán Hàng",
                ];
                var startday =
                [
                    "10/05/2012", "11/07/2013", "10/06/2012", "12/03/2012"
                ];
                var hoatdongs =
                [
                    "Top Menu", "Quy định sử dụng", "Chính sách", "Blog"
                ];
                for (var i = 0; i < 10; i++) {
                    var row = {};
                    row["firstname"] = danhsach[Math.floor(Math.random() * danhsach.length)];
                    row["lastname"] = startday[Math.floor(Math.random() * startday.length)];
                    row["hoatdong"] = hoatdongs[Math.floor(Math.random() * hoatdongs.length)];
                    data[i] = row;
                }
                var source =
                {
                    localdata: data,
                    datatype: "array",
                    datafields:
                    [
                        { name: 'firstname', type: 'string' },
                        { name: 'lastname', type: 'string' },
                        { name: 'hoatdong', type: 'string' }
                    ]
                };
                var dataAdapter = new $.jqx.dataAdapter(source);

                $("#jqxgrid").jqxGrid(
                {
                    width: $("#jqxgrid").width(),
                    source: dataAdapter,
                    selectionmode: 'multiplecellsadvanced',
                    pageable: true,
                    autoheight: true,
                    sortable: true,
                    selectionmode: 'multiplecellsadvanced',

                    columnsresize: true,
                    columns: [
                      { text: 'Bài viết', dataField: 'firstname' },
                      { text: 'Ngày tạo', dataField: 'lastname', width: 100 },
                      { text: 'Nhóm', dataField: 'hoatdong', width: 150, cellsalign: 'right', cellsalign: 'left', align: 'center' },
                      {
                          text: 'Chi tiết', columntype: 'button', width: 80, cellsrenderer: function () {
                              return "Chỉnh sửa";
                          }
                      },
                      {
                          text: 'Chi tiết', columntype: 'button', width: 80, cellsrenderer: function () {
                              return "xóa";
                          }
                      }
                    ]
                });
            });
        </script>
        <h3 style="font-weight:bold;">Quản lý bài viết
            <button type="button" class="btn btn-default pull-right hidden-xs hidden-sm" style="margin-right:20px;border-radius:0px;border:1px solid #ddd;padding-top:10px;" value="Back" onclick="history.go(-1);">
                <span class="fa fa-mail-reply" style="font-size:20px;"></span>
            </button>
        </h3>
        <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;margin:10px 0px;height:1px;background:#ddd;"></div>
        <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;">
            <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:5px;text-align:right;">
                <a href="ControlWebsite.aspx" style="text-decoration:none;color:#333;">
                    <span class="btn btn-default" style="border-radius:0px;background:#d00;color:#fff;">Bài viết mới</span>
                </a>
            </div>
            <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;margin:10px 0px;height:1px;background:#ddd;"></div>
            <div class="col-md-5 col-xs-12 col-lg-5 col-sm-12" style="padding:5px;">
                <div class="col-md-4 col-xs-12 col-lg-4 col-sm-12" style="padding:0px;line-height:34px;">Tìm bài viết</div>
                <div class="col-md-8 col-xs-12 col-lg-8 col-sm-12" style="padding:0px;"><input class="input_add" placeholder="Tên bài viết.." /></div>
            </div>
            <div class="col-md-5 col-xs-12 col-lg-5 col-sm-12" style="padding:5px;">
                <div class="col-md-4 col-xs-12 col-lg-4 col-sm-12" style="padding:0px;line-height:34px;">Nhóm</div>
                <div class="col-md-8 col-xs-12 col-lg-8 col-sm-12" style="padding:0px;">
                    <select class="input_add">
                        <option selected>Tất cả</option>
                        <option>Quy định</option>
                        <option>Chính sách</option>
                        <option>Blog</option>
                    </select>
                </div>
            </div>
            <div class="col-md-2 col-xs-12 col-lg-2 col-sm-12" style="text-align:right;padding:5px;">
                <span class="btn btn-default" style="width:100%;border-radius:0px;background:#00d;color:#fff;font-weight:bold;">Tìm kiếm</span>
            </div>
        </div>
        <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;margin:10px 0px;height:1px;background:#ddd;"></div>
        <div id='jqxWidget' class="col-md-12 col-xs-12 col-lg-12 col-sm-12" style="padding:0px;">
            <div id="jqxgrid"></div>
        </div>
    </div>
</asp:Content>